package com.weds.edpf.core.web;

import com.alibaba.fastjson.JSONObject;
import org.springframework.boot.context.properties.bind.DefaultValue;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import javax.validation.Valid;

import com.weds.core.base.BaseController;
import com.weds.core.annotation.Logs;
import com.weds.core.resp.JsonResult;
import com.weds.core.base.BaseCommPager;
import com.weds.core.base.BasePageSearch;


import com.weds.edpf.core.entity.NTtCardEntity;
import com.weds.edpf.core.service.NTtCardService;

/**
 *
 * @Author wangjianqiang
 * @Description 卡种类 管理
 * @Date 2020-06-16
 * @version  发卡器列表 wangjianqiang 2020/06/16
 */
@RestController
@RequestMapping(value = "/nTtCard")
@Api(value = "卡种类管理", description = "卡种类管理")
public class NTtCardController extends BaseController {
    @Autowired
    private NTtCardService nTtCardService;

    private Logger log = LogManager.getLogger();

	/**
	 * 获取发卡器列表
	 * @param ttlx
	 * @return
	 */
	@Logs
	@ApiOperation(value = "获取发卡器列表", notes = "获取发卡器列表")
	@RequestMapping(value = "/insert", method = RequestMethod.GET)
	public JsonResult<List<NTtCardEntity>> insert(@RequestParam("ttlx") @DefaultValue("900") Integer ttlx) {
		List<NTtCardEntity> list  = nTtCardService.selectByTtLx(ttlx);
		return succMsgData(list);
	}
}